package com.lening.iot.aliyun.strategy;


import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.lening.common.web.Request;
import com.lening.iot.aliyun.pojo.CarEntryExitPO;
import com.lening.iot.aliyun.vo.IotVO;
import com.lening.iot.aliyun.vo.MonthlyCardVO;
import jdk.internal.org.objectweb.asm.TypeReference;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/23 22:14
 */
@Component
public class ParkinglotStrategy implements IotStrategy {

    @Override
    public void iotAddStrategy(IotVO iot) {
        System.out.println("停车场");
        CarEntryExitPO carEntryExitPO = new CarEntryExitPO();
//        carEntryExitPO.setProCommunityId(iot.getProCommunityId());
        carEntryExitPO.setCarNumber(iot.getItems().get("Car_number").getValue());
        String stringMono = Request.asyncPost("iot/parkinglots/add", carEntryExitPO, String.class);
//        System.out.println(stringMono.block()+"车牌号添加");
    }
    }
